{% extends "BlackhouseappBluehouseappBundle:layout:layout.html.twig" %}
{% block title %}
    显示节点
{% endblock %}
{% block body -%}
    <h1>显示节点</h1>

    <table class="record_properties">
        <tbody>

            <tr>
                <th>节点名称</th>
                <td>{{ entity.name }}</td>
            </tr>
            <tr>
                <th>节点代码</th>
                <td>{{ entity.code }}</td>
            </tr>

            <tr>
                <th>可用性</th>
                <td>
                    {% if entity.enabled %}
                        <span class="label label-success">正常</span>
                    {% else %}
                        <span class="label label-danger">已禁用</span>
                    {% endif %}
                </td>
            </tr>
            <tr>
                <th>显示序号</th>
                <td>{{ entity.no }}</td>
            </tr>
            <tr>
                <th>头像</th>
                <td>
                    {% if entity.attachment %}
                        <img  class="box_avatar" border="0"  align="default" src="{{vich_uploader_asset(entity,'image')|imagine_filter('avatar_image')}}"/>
                    {% endif %}
                </td>
            </tr>
            <tr>
                <th>描述</th>
                <td>{{ entity.description }}</td>
            </tr>
            <tr>
                <th>创建时间</th>
                <td>{{ entity.created|date('Y-m-d H:i:s') }}</td>
            </tr>
            <tr>
                <th>修改时间</th>
                <td>{{ entity.modified|date('Y-m-d H:i:s') }}</td>
            </tr>
        </tbody>
    </table>

        <ul class="record_actions">
    <li>
        <a href="{{ path('admin_node') }}">
          返回列表
        </a>
    </li>
    <li>
        <a href="{{ path('admin_node_edit', { 'id': entity.id }) }}">
          编辑
        </a>
    </li>

</ul>
{% endblock %}
